<?php if (!defined('BASE')) {die('No direct file access.');}

//********************************
//	File:		main.php
//	Author:		Philip Pryce
//	Date:		20th July 2008
//	Comments:	An example controller.
//********************************


class Main extends Controller {
	
	
	function __construct () {
		
		// Always remember this, if you dont, you might miss a few features of the controller.
		parent::__construct();
		
	}
	
	function index () {
		
		// pull in a copy of Submind so we can get the config settings...
		$SM = getInstance();
		
		// a simple _assign.
		$this->_assign('sub_header_1', 'Submind ' . VERSION);
		
		// This nice array will make setting vars alot easier!
		$array = array(
			'quote'			=> "ze goggles zey do nossing",
			'paragraph'		=> 'Welcome to your fresh install of Submind ' . VERSION . '.<br /> Be sure to write your own controller and view and replace this default one.',
			'sub_header_2'	=> 'Configration Information',
			'list'			=> array(
				'Default Controller'	=> $SM->config->get('default_controller'),
				'Default Fuction'		=> $SM->config->get('default_function'),
				'Controller Location'	=> APP . 'controllers/main.php',
				'View Location'			=> APP . 'views/main/index.php'
			)
		);
		
		// lets save some memory eh?
		unset($SM);
		
		// sets push all this into the __data array so we'll be able to use it in the view.
		$this->_assign($array);
		
		// load the view, no need to have a .php at the end,
		// but you can put the view in any folder inside of
		// the view folder to keep things more organised.
		$this->_load('main/index');
		
	}
	
}

?>